package com.ruoyi.project.xcx.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.xcx.mapper.XcxBannaMapper;
import com.ruoyi.project.xcx.domain.XcxBanna;
import com.ruoyi.project.xcx.service.IXcxBannaService;

/**
 * 小程序bannaService业务层处理
 * 
 * @author ruoyi
 * @date 2020-06-10
 */
@Service
public class XcxBannaServiceImpl implements IXcxBannaService 
{
    @Autowired
    private XcxBannaMapper xcxBannaMapper;

    /**
     * 查询小程序banna
     * 
     * @param bid 小程序bannaID
     * @return 小程序banna
     */
    @Override
    public XcxBanna selectXcxBannaById(Long bid)
    {
        return xcxBannaMapper.selectXcxBannaById(bid);
    }

    /**
     * 查询小程序banna列表
     * 
     * @param xcxBanna 小程序banna
     * @return 小程序banna
     */
    @Override
    public List<XcxBanna> selectXcxBannaList(XcxBanna xcxBanna)
    {
        return xcxBannaMapper.selectXcxBannaList(xcxBanna);
    }

    /**
     * 新增小程序banna
     * 
     * @param xcxBanna 小程序banna
     * @return 结果
     */
    @Override
    public int insertXcxBanna(XcxBanna xcxBanna)
    {
        xcxBanna.setCreateTime(DateUtils.getNowDate());
        return xcxBannaMapper.insertXcxBanna(xcxBanna);
    }

    /**
     * 修改小程序banna
     * 
     * @param xcxBanna 小程序banna
     * @return 结果
     */
    @Override
    public int updateXcxBanna(XcxBanna xcxBanna)
    {
        xcxBanna.setUpdateTime(DateUtils.getNowDate());
        return xcxBannaMapper.updateXcxBanna(xcxBanna);
    }

    /**
     * 批量删除小程序banna
     * 
     * @param bids 需要删除的小程序bannaID
     * @return 结果
     */
    @Override
    public int deleteXcxBannaByIds(Long[] bids)
    {
        return xcxBannaMapper.deleteXcxBannaByIds(bids);
    }

    /**
     * 删除小程序banna信息
     * 
     * @param bid 小程序bannaID
     * @return 结果
     */
    @Override
    public int deleteXcxBannaById(Long bid)
    {
        return xcxBannaMapper.deleteXcxBannaById(bid);
    }
}
